//
//  ViewController.m
//  28-LayoutAnimationHomework
//
//  Created by 曹曹 on 16/8/22.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "ViewController.h"
#import "UIView+Frame.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lagouFinal;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lagouFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *userFinal;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *userFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *passFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *passFinal;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *userTextFinal;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *userTextFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *passTextFinal;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *passTextFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *loginFinal;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *loginFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftLineFirst;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftLineFinal;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.lagouFinal.priority = 751;
    self.userFinal.priority = 751;
    self.passFinal.priority = 751;
    self.userTextFinal.priority = 751;
    self.passTextFinal.priority = 751;
    self.loginFinal.priority = 751;
    self.leftLineFinal.priority = 751;
    
    self.lagouFirst.priority = 750;
    self.userFirst.priority = 750;
    self.passFirst.priority = 750;
    self.userTextFirst.priority = 750;
    self.passTextFirst.priority = 750;
    self.loginFirst.priority = 750;
    self.leftLineFirst.priority = 750;
    [UIView animateWithDuration:2 delay:0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse animations:^{
        [self.view layoutIfNeeded];
    } completion:^(BOOL finished) {
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
